package com.baize.minespace.service.impl;

import com.baize.minespace.mapper.CategoriesMapper;
import com.baize.minespace.pojo.Categories;
import com.baize.minespace.service.CategoriesService;
import com.baize.minespace.utils.Result;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 分类信息表 服务实现类
 * </p>
 *
 * @author baize
 * @since 2024-04-15
 * @version ${cfg.version}
 */
@Service
public class CategoriesServiceImpl extends ServiceImpl<CategoriesMapper, Categories> implements CategoriesService {
    @Override
    public Result<IPage<Categories>>selectCategoriesPage(Integer rows,Integer page,Categories categories){
        Page<Categories> categoriesPage=new Page<>(rows,page);
        IPage<Categories> categoriesIPage=baseMapper.selectCategoriesPage(categoriesPage, categories);
        return Result.success(categoriesIPage);
    }
}
